package com.ruoyi.zc.service.impl;

import com.ruoyi.zc.domain.ZcUserGrade;
import com.ruoyi.zc.domain.vo.ZcGradeUserVO;
import com.ruoyi.zc.mapper.ZcUserGradeMapper;
import com.ruoyi.zc.service.IZcUserGradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author xuwendi
 * @date 2023-03-19
 */
@Service
public class ZcUserGradeServiceImpl implements IZcUserGradeService
{
    @Autowired
    private ZcUserGradeMapper zcUserGradeMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param userId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public ZcUserGrade selectZcUserGradeByUserId(Long userId)
    {
        return zcUserGradeMapper.selectZcUserGradeByUserId(userId);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param zcUserGrade 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<ZcUserGrade> selectZcUserGradeList(ZcUserGrade zcUserGrade)
    {
        return zcUserGradeMapper.selectZcUserGradeList(zcUserGrade);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param zcUserGrade 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertZcUserGrade(ZcUserGrade zcUserGrade)
    {
        return zcUserGradeMapper.insertZcUserGrade(zcUserGrade);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param zcUserGrade 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateZcUserGrade(ZcUserGrade zcUserGrade)
    {
        return zcUserGradeMapper.updateZcUserGrade(zcUserGrade);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param userIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteZcUserGradeByUserIds(Long[] userIds)
    {
        return zcUserGradeMapper.deleteZcUserGradeByUserIds(userIds);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param userId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteZcUserGradeByUserId(Long userId)
    {
        return zcUserGradeMapper.deleteZcUserGradeByUserId(userId);
    }

    /**
     * 获取综测用户信息列表
     * @return
     */
    @Override
    public List<ZcGradeUserVO> getZcUserGradeList() {
        return zcUserGradeMapper.selectZcUserGradeList();
    }


    /**
     * 根据部门获取综测用户信息列表
     * @return
     */
    @Override
    public List<ZcGradeUserVO> getZcUserGradeListByDept(long deptId) {
        return zcUserGradeMapper.selectZcUserGradeListByDeptId(deptId);
    }

    @Override
    public List<ZcGradeUserVO> getZcUserGradeListAll() {
        return zcUserGradeMapper.selectZcUserGradeListAll();
    }
}
